package tw101.bm;

/**
 * Created by Alan on 12/29/13.
 */
public class CenteredTrianglePrinter extends ShapePrinter {

    public static void main (String[] args) {
        int numLines = getN(args);
        new CenteredTrianglePrinter().makeShape(numLines);
    }

    void makeShape(int lines) {
        int asterisks = 1;
        int spaces = lines-asterisks;

        for (; spaces>=0; spaces--) {
            printLine(spaces, asterisks);
            asterisks += 2;
        }
    }
}
